package com.smedi.ismedi.progress.core.domain.repository;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.core.application.command.ConstructionLogDetailQuery;
import com.smedi.ismedi.progress.core.application.command.ConstructionLogListQuery;
import com.smedi.ismedi.progress.core.application.command.ConstructionLogQuery;
import com.smedi.ismedi.progress.core.application.command.ConstructionLogSaveAndDraft;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ConstructionLog;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ConstructionLogDetail;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ConstructionLogWeather;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.Person;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ConstructionLogEntity;

import java.util.List;

/**
 *
 *
 * @author liaojiajie
 * @date 2022/11/22 10:27
 */
public interface ConstructionLogRepository {
    /**
    *  查询施工日志列表分页
    * @param constructionLogListQuery
    * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.smedi.ismedi.progress.core.domain.aggregatemodel.ConstructionLog>
    * @date 2022/11/22 11:17
    */
    Page<ConstructionLog> getConstructionLogList(ConstructionLogListQuery constructionLogListQuery);

    /**
    * 查询施工日志详情
    * @param constructionLogDetailQuery
    * @return com.smedi.ismedi.progress.core.domain.aggregatemodel.ConstructionLogDetail
    * @date 2022/11/22 14:18
    */
    ConstructionLogDetail getConstructionLogDetail(ConstructionLogDetailQuery constructionLogDetailQuery,List<Person> personList);

    List<ConstructionLogWeather> constructionContext(ConstructionLogQuery constructionLogQuery);

    ConstructionLogSaveAndDraft saveReportAndDetial(ConstructionLogSaveAndDraft constructionLogSaveAndDraft);

    ConstructionLogSaveAndDraft getConstructionLogOne(ConstructionLogSaveAndDraft constructionLog);

    /**
    * app 查詢施工日誌
    * @param constructionLogListQuery
    * @param personList
    * @return com.smedi.ismedi.progress.core.domain.aggregatemodel.ConstructionLog
    * @date 2022/11/23 15:23
    */
    ConstructionLog getConstructionLogAPPList(ConstructionLogListQuery constructionLogListQuery, List<Person> personList);

    void updateConstructionLog(ConstructionLogSaveAndDraft constructionLogQuery);

    ConstructionLogEntity getConstructionLog(ConstructionLogSaveAndDraft constructionLogSaveAndDraft);

    Integer findConstructionLog(String firstDay, Long projectId);
}
